package cn.wen.eeayjoke.net;

import cn.wen.eeayjoke.entity.bean.base.ResponseBean;
import cn.wen.eeayjoke.entity.bean.home.AdvertisementsBean;
import cn.wen.eeayjoke.entity.bean.home.HomeData;
import cn.wen.eeayjoke.entity.bean.home.MoreBean;
import cn.wen.eeayjoke.entity.bean.login.LoginBean;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;

/**
 * 后台统一接口API
 */

public interface ServerApi {
    // 登录
    @POST(API.LOGIN)
    Observable<ResponseBean<LoginBean>> login(@Body RequestBody requestBody);

    // 启动页面广告
    @POST(API.SPLASH_ADV)
    Observable<ResponseBean<AdvertisementsBean>> adsListForGroupId(@Body RequestBody requestBody);

    //
    @POST(API.HOME_INDEX)
    Observable<ResponseBean<HomeData>> index(@Body RequestBody requestBody);

    @POST(API.HOME_MORE_ALSO_LIKE)
    Observable<ResponseBean<MoreBean>> moreAlsoLike(@Body RequestBody requestBody);
}
